home *** CD-ROM | disk | FTP | other *** search
- From: jdmorris@ix.netcom.com (Jason D. Morris)
- Message-ID: <31475017.8100207@nntp.ix.netcom.com>
- X-Original-Date: Wed, 13 Mar 1996 22:50:05 GMT
- Path: in2.uu.net!bounce-back
- Date: 13 Mar 96 23:50:08 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Exception handling -- was a finally block ever considered?
- Organization: Netcom
- X-Netcom-Date: Wed Mar 13 2:49:19 PM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMUdfSeEDnX0m9pzZAQEK/gGAnltiXyladXrZ0BA7OagbEpMxnQQ61jiW
- KWJtIeKpcRgOUroox9CUIQrazxVcRBVT
- =VVFe
-
- I would like to know if the following construct was ever considered by
- the C++ and if it was, why it was rejected.
-
- try
- {
- // some code that could generate an exception...
- }
- catch ( // some expected exception type )
- {
- // handler code
- }
- finally
- {
- // code that would be guaranteed to execute no matter how the
- // function was exited.
- }
-
- Basically, a Java style finally clause. I also found it interesting
- that Microsoft's structured exception handling under Win32 includes a
- finally clause.
-
- Jason
- ---
- [ comp.std.c++ is moderated. To submit articles: try just posting with ]
- [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
- [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
- [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
- [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
-